<?php
class Getjson_model extends CI_Model{
    function __construct(){
      parent::__construct();
   }
   public function extraAplicacionInst($aplicaInstId){
       echo $aplicaInstId;
        $sql = "select * from aplicainstrumento where `aplicaInstId` = '$aplicaInstId'";
        $result = $this->db->query($sql)->result();
//        echo json_encode($result[0]);
        return true;
   }
   public function extraeSnies($programaId,$parId){
       /*Funcion extraer informacion del programa*/
       $sql = "select * from participantes_por_programas parProg
                inner join programas prog on prog.`programaId` = parProg.`programaId`
                inner join municipios mun on mun.`municipioId` = prog.`municipioId`
                where parProg.`participanteId` = '$parId' and parProg.`programaId` = '$programaId' ";
       $result = $this->db->query($sql)->result();
       echo json_encode($result[0]);
   } //fin public function extraeSnies($programaId){
   public function institucion($instiId){
       /*Funcion extraer informacion del programa*/
       $sql = "select * from agentes where `agenteId` = '$instiId'";
       $result = $this->db->query($sql)->result();
       echo json_encode($result[0]);
   } //fin public function extraeSnies($programaId){
}//fin class
?>
